import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);
export default new Vuex.Store({
  state:{
    user:{}
  },
  mutations:{
    ulogin(state,data){
      state.user = data;
    },
    u_exit(state){
      state.user = {}
    }
  },
  actions:{
    login(state,data){
      state.commit('ulogin',data)
    },
    exit(state){
      state.commit('u_exit');
    }
  }
})
